package com.itsu.api.controllerApi;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@RequestMapping("users")
public interface MyCenterControllerApi {
    /**
     * 获取用户信息
     * @param userId
     * @return
     */
    @GetMapping
    public ResponseEntity queryUserInfoByUserId(@RequestParam(value = "userId", required = false) Long userId);

    /**
     * 更新用户信息
     * @param map
     * @return
     */
    @PutMapping
    public ResponseEntity updateUserInfoByUserId(@RequestBody Map<String, String> map);

    @GetMapping("counts")
    public ResponseEntity queryCounts();

    /**
     * 更新头像
     * @param headPhoto
     * @return
     */
    @PostMapping("header")
    public ResponseEntity updateLogo(@RequestParam("headPhoto") MultipartFile headPhoto);

    @PostMapping("questions")
    public ResponseEntity updateQuestions(@RequestBody Map<String, String> map);


    /**
     * 获取用户通用配置信息
     * @param
     * @return
     */
    @GetMapping("settings")
    public ResponseEntity getSettings();

    /**
     * 黑名单人员
     * @param map
     * @return
     */
    @GetMapping("blacklist")
    public ResponseEntity getBlackList(@RequestBody Map<String, String> map);

    /**
     * 更新通用设置
     * @param map
     * @return
     */
    @PostMapping("notifications/setting")
    public ResponseEntity updateSetting(@RequestBody Map<String, String> map);

    /**
     * 短信发送
     * @return
     */
    @PostMapping("phone/sendVerificationCode")
    public ResponseEntity sendVerificationCode();

    /**
     * 短信验证
     * @return
     */
    @PostMapping("phone/checkVerificationCode")
    public ResponseEntity checkVerificationCode(@RequestParam("verificationCode") String verificationCode);

    /**
     * 更新手机号
     * @return
     */
    @PostMapping("phone")
    public ResponseEntity updatePhone(@RequestParam("phone") String phone);

}
